import 'package:flutter/cupertino.dart';
import 'package:hitutor/Util/Global.dart';
import 'package:hitutor/Util/MyColor.dart';
import 'package:hitutor/Util/PageUtil.dart';
import 'package:hitutor/Widget/MyImage.dart';
import 'package:hitutor/Widget/Star.dart';

// class TeacherInfo extends StatefulWidget {
//   dynamic data;
//
//   TeacherInfo(this.data);
//
//   @override
//   State<StatefulWidget> createState() {
//     return _TeacherInfo();
//   }
// }
//
// class _TeacherInfo extends State<TeacherInfo> {
//   bool isLike = false;
//
//   @override
//   Widget build(BuildContext context) {
//     return Container(
//         decoration: Global.getWhiteBg(6),
//         width: double.infinity,
//         child: Column(crossAxisAlignment: CrossAxisAlignment.end, children: [
//           LocalImage("cross_gray.png", width: 20, padding: EdgeInsets.all(8), onTap: () {
//             PageUtil().back(context);
//           }),
//           Expanded(
//               child: SingleChildScrollView(
//                   child: Container(
//                       padding: EdgeInsets.fromLTRB(16, 0, 16, 0),
//                       child: Column(crossAxisAlignment: CrossAxisAlignment.center, children: [
//                         Star(),
//                         NetImage("${widget.data["photo"]}", height: 220, width: 220, fit: BoxFit.cover, padding: EdgeInsets.fromLTRB(0, 8, 0, 16)),
//                         Row(children: [
//                           Text("${widget.data["teacherName"]}", style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold, color: MyColor.Orange)),
//                           LocalImage("mic.png", width: 24),
//                           Expanded(child: Container()),
//                           LocalImage(isLike ? "like_on.png" : "like_off.png", width: 24, onTap: () {
//                             isLike = !isLike;
//                             setState(() {});
//                           })
//                         ]),
//                         Container(height: 0.8, color: MyColor.Orange, margin: EdgeInsets.only(top: 16, bottom: 8)),
//                         ItemInfo("教學年資：", "12年"),
//                         ItemInfo("可教授課程：", "初級課程、中級課程、中高級課程、高級課程"),
//                         ItemInfo("適合學員：", "初級、中級、高級"),
//                         ItemInfo("教學風格：", "擅長引導、具架構性、學術性"),
//                         ItemInfo("教學背景：", "多倫多大學 / 英文系 / 碩士"),
//                         ItemInfo("證照/證書：", "TEFL證書"),
//                         Container(
//                             color: Color(0xfff1f1f1),
//                             margin: EdgeInsets.fromLTRB(0, 8, 0, 16),
//                             width: double.infinity,
//                             padding: EdgeInsets.all(8),
//                             child: Text(
//                                 "Hello! My name is Rachel (Rachel M.). I graduated in 2004 from the Faculty of Philology, where I majored in English language and literature. Since then I have been teaching as an ESL teacher to the beginner, intermediate, and advanced students of various cultural and linguistic backgrounds in state schools, colleges and online. I am a very responsible and motivated, highly educated teacher. On the other hand, I am a fun, creative and positive teacher, who gives her maximum to her students. I am a nature lover so whenever I",
//                                 style: TextStyle(height: 2, fontSize: 12, color: Color(0xff483115))))
//                       ]))))
//         ]));
//   }
// }
//
// class ItemInfo extends StatelessWidget {
//   String title;
//   String content;
//
//   ItemInfo(this.title, this.content);
//
//   @override
//   Widget build(BuildContext context) {
//     return Padding(
//       padding: EdgeInsets.fromLTRB(0, 8, 0, 8),
//       child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
//         Container(width: 100, child: Text("$title", style: TextStyle(fontSize: 12, color: Color(0xff483115), fontWeight: FontWeight.bold))),
//         Expanded(child: Text("$content", style: TextStyle(fontSize: 12, color: Color(0xff483115))))
//       ]),
//     );
//   }
// }
